# #类的定义
# class Car:
#     wheels = 4
#     def drive(self):
#         print('开车方式')
#     def stop(self):
#         print('停车方式')
#
# #对象的创建
#
# my_car = Car()
# print(my_car.wheels)
# my_car.drive()
# my_car.stop()

#定义私有成员
class PersonInfo:

    __weight = 55
    def __info(self):
        print(f'我的体重是{self.__weight}kg')

    def get_weight(self):

        print(f'我的体重是{self.__weight}kg')
        self.__info()

class Myclass:
    def __init__(self):
        self.name = "Default"
    def print_name(self):
        print("Name:", self.name)

# class PersonInfo:
#     __weight = 55
#     def __info(self):
#         print(f' 我的体重是{self.__weight}kg')
#     def get_weight(self):
#         print(f' 我的体重是{self.__weight}kg')
#         self.__info()
#

